.cart-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.actions {
  display: flex;
  gap: 8px;
}
.card :deep(.el-table) {
  --el-table-header-bg-color: #fafafa;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-weight: 600;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.thumb {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  background: #f2f3f5;
}
.thumb-clickable {
  cursor: zoom-in;
}
.meta .title {
  font-weight: 600;
}
.meta .sku {
  font-size: 12px;
  color: #909399;
  margin-top: 4px;
}
.subtotal {
  color: #303133;
  font-weight: 600;
}

/* 购物车数量输入框：紧凑宽度 */
.cart-quantity-input {
  width: 120px !important;
}

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.summary-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sep {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: #e5e6eb;
}
.summary-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.price-line {
  color: #606266;
}
.price-line .total {
  color: #f56c6c;
  font-size: 18px;
  font-weight: 700;
  margin: 0 8px;
}
.price-line .discount {
  color: #67c23a;
  margin-left: 8px;
}

/* ImageViewer 预览容器兜底层级，防止被页面其他层覆盖 */
:root {
  --el-index-popup: 3000;
}

// ============ 暗黑模式适配 ============
:global(.dark) {
  .card :deep(.el-table) {
    --el-table-header-bg-color: #252525;
  }

  .card-title {
    color: #e5eaf3;
  }

  .thumb {
    background: #252525;
    border: 1px solid #303030;
  }

  .meta .title {
    color: #e5eaf3;
  }

  .meta .sku {
    color: #909399;
  }

  .subtotal {
    color: #e5eaf3;
  }

  .sep {
    background: #303030;
  }

  .price-line {
    color: #b3b3b3;
  }

  .price-line .total {
    color: #ff7875;
  }

  .price-line .discount {
    color: #73d13d;
  }
}

